const _ = require('lodash')

const match = _.curry((reg, str) => str.match(reg));

const haveSpace = match(/\s+/g);
const haveNumber = match(/\d+/g);

console.log(haveSpace('hellword'));// null
console.log(haveNumber('abc'));// null

const filter = _.curry((fn, array) => array.filter(fn));

console.log(filter(haveSpace, ['abc efg', 'abc_efg']));

const findSpace = filter(haveSpace);
console.log(findSpace(['abc efg', 'abc_efg']))